/*
 * @Author: 晴鸢. 3013433857@qq.com
 * @Date: 2025-11-05 08:09:22
 * @LastEditors: 晴鸢. 3013433857@qq.com
 * @LastEditTime: 2025-11-05 15:29:23
 * @FilePath: /Learn/Webself/ServerCal.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include<string>
#include"ServerCal.hpp"
#include"socket.hpp"
#include"TcpServer.hpp"
void Debugprint(const std::string &str)
{
    std::cout<<str<<" port"<<std::endl;
}
//./SercerCal 8080
int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Debugprint(argv[0]);
        exit(0);
    }
    uint16_t port=std::stoi(argv[1]);
    ServerCal cal;
    TcpServer*tcp=new TcpServer(port,std::bind(&ServerCal::processor,&cal,std::placeholders::_1));
    tcp->Init();
    tcp->start();
    return 0;
}